import request from '@/utils/request'
/**
 * 人员管理列表-分页
 */
export const ownersPagingListApi = (data) => {
  return request({
    url: '/owners/member',
    params: data
  })
}
/**
 * 人员管理列表-添加
 */
export const addOwnersListApi = (data) => {
  return request({
    method: 'post',
    url: '/owners/member',
    data
  })
}
/**
 * 人员管理列表-删除
 */
export const delOwnersListApi = (id) => {
  return request({
    url: `/owners/member/${id}`,
    method: 'DELETE'

  })
}
/**
 * 人员管理列表-详情-回显
 */
export const showOwnersDetailsApi = (id) => {
  return request({
    url: `/owners/member/${id}`
  })
}
/**
 * 人员管理-修改
 */
export const editOwnersDetailsApi = (data) => {
  return request({
    method: 'PUT',
    url: `/owners/member/${data.id}`,
    data
  })
}
// 获取小区
export const getCommunityListApi = (current, pageSize) => {
  return request({
    url: '/community',
    params: { current, pageSize }
  })
}
// 获取栋数
export const showBuildingApi = (data) => {
  return request({
    url: '/house/building',
    params: data

  })
}
// 获取房产
export const getHosuseListApi = (data) => {
  return request({
    url: '/house/index',
    params: data
  })
}

// 所属成员
export const getMemberListApi = (data) => {
  return request({
    url: '/owners/member',
    params: data
  })
}
